#ifndef VDUSERLIST_H
#define VDUSERLIST_H

#include <QObject>
#include <QVector>
#include "VDEnums.h"

class VDUser;

class VDUserList : public QObject
{
	Q_OBJECT

public:
	VDUserList(QObject *parent);
	~VDUserList();

	bool proverka(const QString &ID, quint16 checkSum, VD::UserState us);
	bool proverka(const VDUser &user);

	const VDUser* getUser(const QString &ID) const;

	void upCountAnswers();

	void offlineMaster();

/*private:*/
	void readSettingList();
	void writeSettingList();

private:
//	void 
	typedef QVector<VDUser*> VDUsers;
	VDUsers m_users;

signals:
	void addUser(const VDUser&);
	void removeUser(const VDUser&);
	void changeUser(const VDUser&);
	void changeStateUser(const VDUser&, VD::UserState old);
};

#endif // VDUSERLIST_H
